<style>
.view-key {
	width:135px;
	float:left;
	text-align:right;
}
.view-value {
	margin-left:145px;
}
</style>


<a href="/admin/{{$current_controller}}/edit/{{$model_item['id']}}" class="btn btn-primary"><i class="fa fa-edit"></i> 编辑资料</a>

<?PHP
$basicinfo = $otherinfo = $seoinfo = $interactioninfo = $origininfo = '';

foreach($extschema as $key => $value)
{
	if(empty($model_item[$key])) continue;
 
$tmp = '';
$tmp .= '<div style="clear:both;"><div class="view-key"><B>'.$extschema[$key]['translate'].':</B></div><div class="view-value">';

if($key=='remoteurl'){
	$tmp .= '<a href="'.$model_item[$key].'" onclick="return true;" target="_blank">'.$model_item[$key].'</a>';
	// 使用onclick="return true;"，来忽略dialog中链接的绑定事件
}
else{
	$tmp .= $model_item[$key];
}

$tmp .= '</div></div>';
if(in_array($key,array('deleted','creator','lastupdator','created','updated','published','status'))){
	$otherinfo .= $tmp;
}
elseif(in_array($key,array('seodescription','seokeywords','seotitle','keywords','summary'))){
	$seoinfo .= $tmp;
}
elseif(in_array($key,array('point_nums','favor_nums','comment_status','comment_nums','view_nums'))){
	$interactioninfo .= $tmp;
}
elseif(in_array($key,array('crawl_id','remoteurl','origin','refererurl'))){
	$origininfo .= $tmp;
}
else{
	$basicinfo .= $tmp;
}

}

?>
<div class="ui-corner-all" style="margin:10px;">
    
    <div class="tab-content">
    	{{if $basicinfo}}
    	<div id="view-basic">{{$basicinfo}}</div>
    	<hr>
    	{{/if}}
    	{{if $otherinfo}}
    	<div id="view-other">{{$otherinfo}}</div>
    	<hr>
    	{{/if}}
    	{{if $seoinfo}}
    		<div id="view-seo">{{$seoinfo}}</div>
    		<hr>
    	{{/if}}
    	{{if $origininfo}}
    	<div id="view-origin" class="tab-pane">{{$origininfo}}</div>
    	<hr>
    	{{/if}}
    	{{if $interactioninfo}}<div id="view-interaction">{{$interactioninfo}}</div>{{/if}}
    </div>
</div>

<div class="row">
    <div class="col-md-6">
        <h3>用户字段信息</h3>
        {{if $model_item['creator']}}
        <?php $creator = $model_item['creator']; ?>
        <portlet model="User" list_tpl="inner" portlet="body" conditions="id=$creator">
            {{array_to_table($item)}}
        </portlet>

        {{/if}}
    </div>

    <div class="col-md-6"> <h3>数据字段信息</h3><?php echo array_to_table($datainfo); ?> </div>
</div>

